package com.study.factory.original;

import java.util.HashMap;
import java.util.Map;

public class OriginalStaticFactory {

    static String arg1;

    public static  Map <String,Object> stringObjectMap = new HashMap<String, Object>();

    static {
//        stringObjectMap.put(arg1 , new OriginalDemo(arg1));
        stringObjectMap.put("test1" , new OriginalDemo("test1"));

        stringObjectMap.put("test2" , new OriginalDemo("test2"));
    }

    public static OriginalDemo getObject(String key){

        return (OriginalDemo) stringObjectMap.get(key);
    }

    public static String getArg1() {
        return arg1;
    }

    public static void setArg1(String arg1) {
        OriginalStaticFactory.arg1 = arg1;
    }
}
